package file

import "time"

type CommonFilePo struct {
	//主键
	Uid string `gorm:"primary_key"`
	//文件名
	FileName string
	//文件路径
	FilePath string
	//文件大小
	FileSize int64
	//文件类型
	FileType string
	Business string
	//是否私有，如果是私有，则需要转换url，0否1是
	IsPrivate  int64 `gorm:"default:0"`
	TenantCode string
	IsDeleted  int32     `gorm:"type:tinyint(1);not null;default:0" json:"is_deleted"`
	CreatedOn  time.Time `gorm:"type:datetime;not null;default:CURRENT_TIMESTAMP" json:"created_on"`
	CreatedBy  string    `gorm:"type:varchar(36);not null;default:''" json:"created_by"`
	ModifiedOn time.Time `gorm:"type:datetime;not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" json:"modified_on"`
	ModifiedBy string    `gorm:"type:varchar(36);not null;default:''" json:"modified_by"`
}

func (p CommonFilePo) TableName() string {
	return "common_file"
}
